//
//  LGGroupMemberCell.m
//  HeartDiseaseManage
//
//  Created by 1234 on 2023/2/24.
//

#import "LGGroupMemberCell.h"

@implementation LGGroupMemberCell

- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        [self.contentView addSubview:self.headPic];
        [self.contentView addSubview:self.titleLabel];
        [self.headPic mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.centerX.equalTo(self.contentView);
            make.width.height.equalTo(@(viewPix(50)));
        }];
        [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.headPic.mas_bottom).offset(viewPix(5));
            make.left.right.equalTo(self.contentView);
            make.height.equalTo(@(viewPix(20)));
        }];
    }
    return self;
}

-(UIImageView *)headPic{
    if(!_headPic){
        _headPic = [[UIImageView alloc]initWithImage:defaultPatientMan];
        _headPic.cornerRidus = 5;
    }
    return _headPic;
}

-(UILabel *)titleLabel{
    if(!_titleLabel){
        _titleLabel = [UILabel lableWithText:@"" colorString:@"#666666" textFont:LGFont(14) textAlignment:NSTextAlignmentCenter lines:1];
    }
    return _titleLabel;
}

@end
